
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style type="text/css">
		#workContent{
			display:flex;
			align-items: center;
		}
		#addWorkContent{
			display: flex;
			justify-content: flex-end;
		}
	</style>
	<body>
		<h3>工作简历</h3>
		<div id="resumePlace">
			<div id="workMsg">
				<!-- <div id=""> 
					<hr />
					公司名称：<input type="text" name="" id="" value="" />
					职位：<input type="text" name="" id="" value="" />
					<a href="#" onclick="doActioneDelete(event)">删除工作经历</a>
					<br>
					<br>
					<div id="workContent">
						工作职责及工作内容描述:
						<textarea rows="8" cols="100">					
						</textarea>
					</div>
				</div> -->
				
			</div>
			<hr />
			<a href="#" id="addWorkContent" onclick="doActionAdd()">添加工作经历</a>
		</div>
	</body>
	<script type="text/javascript">
		function doActioneDelete(event){
			console.log(event);
			var workplaceAll = document.getElementById("workMsg");
			var delElement = event.target.parentElement;
			
			workplaceAll.removeChild(delElement);
			
		}
		
		function doActionAdd(){
			var workplaceAll = document.getElementById("workMsg");
			var newElement = document.createElement("div");
			newElement.innerHTML = `
						<hr />
						公司名称：<input type="text" name="" id="" value="" />
						职位：<input type="text" name="" id="" value="" />
						<a href="#" onclick="doActioneDelete(event)">删除工作经历</a>
						<br>
						<br>
						<div id="workContent">
							工作职责及工作内容描述:
							<textarea rows="8" cols="100">					
							</textarea>
						</div>
				`
			
			workplaceAll.appendChild(newElement);
		}
		onload = function(){
			doActionAdd();
		}
	</script>
</html>
